package com.xiaoshuidi.cloud.module.report.dal.mapper.datamanage;

import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.report.controller.datamanage.vo.*;
import com.xiaoshuidi.cloud.module.report.dal.DO.RoomHouseDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface BusinessDataMapper extends BaseMapperX<RoomHouseDO> {
    /**
     * 在租房源总览
     *
     * @param apartmentIds
     * @param condition
     * @return
     */
    OverviewOfHouseRespVO overviewOfHouse(@Param("apartmentIds") List<Long> apartmentIds, @Param("condition") String condition);

    List<RentalStatistics> rentalStatistics(@Param("apartmentIds") List<Long> apartmentIds,@Param("startDate") String startDate,@Param("endDate") String endDate);

    List<EmptyRoomChangeTrendRespVO> emptyRoomChangeTrend(@Param("apartmentIds") List<Long> apartmentIds, @Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);

    SigningOverviewRespVO signingOverview(@Param("apartmentIds") List<Long> apartmentIds);

    /**
     * 签约人员排名
     * @param apartmentIds
     * @param rankingMode
     * @param startDate
     * @param endDate
     * @return
     */
    List<RankingOfContractedRespVO> rankingOfContractedPersonnel(@Param("apartmentIds") List<Long> apartmentIds,@Param("rankingMode") String rankingMode,@Param("startDate") LocalDate startDate,@Param("endDate") LocalDate endDate);

    /**
     * 门店签约排名
     * @param apartmentIds
     * @param rankingMode
     * @param startDate
     * @param endDate
     * @return
     */
    List<RankingOfContractedRespVO> rankingOfContractedApartment(@Param("apartmentIds") List<Long> apartmentIds,@Param("rankingMode") String rankingMode,@Param("startDate") LocalDate startDate,@Param("endDate") LocalDate endDate);


    List<ContractExpirationNumRespVO> contractExpirationNum(@Param("apartmentIds") List<Long> apartmentIds);
}
